import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '企业名称',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '企业地址',
    align: "center",
    dataIndex: 'address'
  },
  {
    title: '法人代表',
    align: "center",
    dataIndex: 'legalperson'
  },
  {
    title: '联系电话',
    align: "center",
    dataIndex: 'phone'
  },
  {
    title: '邮箱',
    align: "center",
    dataIndex: 'email'
  },
  {
    title: '官网',
    align: "center",
    dataIndex: 'websiteAddress'
  },
  {
    title: 'LOGO',
    align: "center",
    dataIndex: 'logo',
    customRender: render.renderImage,
  },
  {
    title: '营业执照编号',
    align: "center",
    dataIndex: 'businesslicensenumber'
  },

  {
    title: '登记时间',
    align: "center",
    dataIndex: 'registrationdate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '企业描述',
    align: "center",
    dataIndex: 'description',
  },


  {
    title: '注册地址',
    align: "center",
    dataIndex: 'registeredAddress',
  },
  {
    title: '经营范围',
    align: "center",
    dataIndex: 'businessScope',
  },
  {
    title: '轮播图状态',
    align: "center",
    dataIndex: 'slider_dictText',
  },
  {
    title: '企业状态',
    align: "center",
    dataIndex: 'status_dictText',
  },

];

// 高级查询数据
export const superQuerySchema = {
  name: {title: '企业名称',order: 0,view: 'text', type: 'string',},
  address: {title: '企业地址',order: 1,view: 'text', type: 'string',},
  legalperson: {title: '法人代表',order: 2,view: 'text', type: 'string',},
  phone: {title: '联系电话',order: 3,view: 'text', type: 'string',},
  logo: {title: 'LOGO',order: 4,view: 'image', type: 'string',},
  businesslicensenumber: {title: '营业执照编号',order: 5,view: 'text', type: 'string',},
  status: {title: '企业状态',order: 6,view: 'radio', type: 'string',dictCode: 'company_status',},
  registrationdate: {title: '登记时间',order: 7,view: 'date', type: 'string',},
  description: {title: '企业描述',order: 8,view: 'textarea', type: 'string',},
};
